<% 
@servlet.getResponse().setStatus(responseStatus!404);

var message = @ObjectUtils.toString(@request.getAttribute("message"));

if (isBlank(message)){
	message = text('sys.error.404.message');
}

// 如果是异步请求或是手机端，则直接返回信息
if (@Servlets.isAjaxRequest(request)) {
	print(@Servlets.renderResult(@Global.FALSE, message));
}

// 输出异常信息页面
else {
%>
<% layout('/layout/default.html', {title: '404 - '+text('sys.error.404.title'), libs: ['layout']}){ %>
	<!-- Main content -->
	<section class="content">
		<div class="error-page">
			<h2 class="headline text-yellow"> 404</h2>

			<div class="error-content">
				<h3><i class="fa fa-warning text-yellow"></i> ${message}</h3>

				<p>
					${text('sys.error.404.message.p1')}<a href="${ctx}">返回主页</a>
				</p>

				<form class="search-form">
					<div class="input-group">
						<input type="text" name="search" class="form-control" placeholder="Search">

						<div class="input-group-btn">
							<button type="submit" name="submit" class="btn btn-warning btn-flat"><i class="fa fa-search"></i>
							</button>
						</div>
					</div>
					<!-- /.input-group -->
				</form>
			</div>
			<!-- /.error-content -->
		</div>
		<!-- /.error-page -->
	</section>
	<!-- /.content -->
    <div style="text-align: center;">
        <% var productName = @Global.getProperty('productName'), productVersion = @Global.getProperty('version'); %>
        <strong>Copyright &copy; 2017-${@DateUtils.getYear()} <a href="http://jsite.org.cn">${productName}</a>.</strong> All rights
        reserved.
    </div>

<% } %>
<% } %>